﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace T05ClassType
{
    class Program
    {
        static void Main(string[] args)
        {
            Book b1 = new Book();
            b1.bookName = "平凡的世界";
            b1.page = 345;
            b1.price = 34.0;

            Console.WriteLine("{0}共{1}页,价格{2}元", b1.bookName, b1.page, b1.price);

            Book b2 = b1;//b1与b2指向同一个内存区域

            b2.price = 100;

            Console.WriteLine("{0}共{1}页,价格{2}元", b1.bookName, b1.page, b1.price);

            Console.ReadKey();
        }
    }

    // 当行注释
    /*多行注释*/
    /// <summary>
    /// Book类：用来描述系统中数据库实体类
    /// </summary>
    class Book
    {
        public string bookName;
        public int page;
        public double price;
    }
}
